package cn.kimoon.dau_android.API;

import java.util.List;
import java.util.Map;

import cn.kimoon.dau_android.Model.ModelEngineDetail;
import cn.kimoon.dau_android.Model.ModelEngineRoom;
import cn.kimoon.dau_android.Model.ModelLogin;
import okhttp3.RequestBody;
import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Headers;
import retrofit2.http.PUT;
import retrofit2.http.QueryMap;

/**
 * Created by xiangdong on 2016/11/30.
 */

public interface ApiDAU {
    String API_DAU_LOGIN = "api/login";                         // 登录
    String API_DAU_COLLECTOR_LIST = "api/collector_list";       // 获取采集器列表
    String API_DAU_COLLECTOR = "api/collector";                 // 获取特定采集器
    String API_DAU_SECURE_LINE = "api/temperature_secure_line"; // 设置警告值
    String API_DAU_CONTACT = "api/ctrl_contact";                // 设置4路干接点
    String API_DAU_CONFIRM_MSG = "api/confirm_msg";             // 确认异常信息

    @GET(API_DAU_LOGIN)
    Call<ModelLogin> apiLogin(@QueryMap Map<String, String> parameters);

    @GET(API_DAU_COLLECTOR_LIST)
    Call<ModelEngineRoom> apiCollectorList(@QueryMap Map<String, String> parameters);

    @GET(API_DAU_COLLECTOR)
    Call<ModelEngineDetail> apiCollector(@QueryMap Map<String, String> parameters);

    @PUT(API_DAU_SECURE_LINE)
    Call<ModelLogin> apiSecureLine(@Body Map<String, String> parameters);

    @PUT(API_DAU_CONTACT)
    Call<ModelLogin> apiContact(@Body Map<String, Object> route);

    @GET(API_DAU_CONFIRM_MSG)
    Call<ModelLogin> apiConfirmMsg(@QueryMap Map<String, String> parameters);
}
